﻿<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
    xmlns:dssp="http://schemas.microsoft.com/xw/2004/10/dssp.html"
    xmlns:svc="http://www.hccrobotica.nl/2011/09/hccplayermodule.html"
    >

  <xsl:import href="/resources/dss/Microsoft.Dss.Runtime.Home.MasterPage.xslt" />

  <xsl:template match="/">
    <xsl:comment><!-- Service Header Info --></xsl:comment>
    <xsl:variable name="title">
      HCC Robotica Soccer Player Module
    </xsl:variable>
    <xsl:variable name="serviceName">
      <img src="resources/HCCPlayerModule.Y2011.M09/HCC.Robotics.HCCPlayerModule.Resources.hccrobotica.png" align="middle"/><br/> HCCPlayerModule
    </xsl:variable>
    <xsl:variable name="description">
      This service communicate with the HCCReferee, and gives the player information on the ball position, player positions, and the games state.
    </xsl:variable>
    
    <xsl:call-template name="MasterPage">
      <xsl:with-param name="serviceName" select="$serviceName" />
      <xsl:with-param name="description" select="$description" />
      
      <!-- If title is not provided, serviceName will be used instead. -->
      <xsl:with-param name="title">
        <xsl:value-of select="$serviceName" />
        <xsl:if test="$title != ''">
          <xsl:text> - </xsl:text>
          <xsl:value-of select="$title" />
        </xsl:if>        
      </xsl:with-param>
      
      <!-- Possible values for navigation are: 'Open', 'Closed', and 'None'
           'Open' is the default value. -->
      <xsl:with-param name="navigation" select="'Open'" />
      
      <!-- Turn on/off XML Button for RAW XML view. Options are: 'None' and 'Show' -->
      <xsl:with-param name="xmlButton" select="'None'" />

      <!-- The contents of head param will be placed just before the </head> tag in html. -->
      <xsl:with-param name="head">
        <style type="text/css">
          /* Service-specific stylesheet goes here */
        </style>
        <script language="javascript" type="text/javascript">
          <![CDATA[<!--

/* Service-specific script goes here */

dssRuntime.init = function()
{
  // Add page initialization code here.
  // This function is attached to the window.onload event.
  // Do not override window.onload.
}

//-->     ]]>
        </script>
      </xsl:with-param>
    </xsl:call-template>
  </xsl:template>

  <!-- Match service state's document element. -->
  <xsl:template match="/svc:HCCPlayerModuleState">
    <table width="75%" align="center" border="2">
      <tr class="odd">
        <th colspan="2" align="center">Configuration</th>
      </tr>
      <tr class="even">
        <th width="25%">Host:</th>
        <td>
          <xsl:value-of select="svc:Configuration/svc:Host"/>
        </td>
      </tr>
      <tr class="odd">
        <th>Port:</th>
        <td>
          <xsl:value-of select="svc:Configuration/svc:Port"/>
        </td>
      </tr>
      <tr class="even">
        <th>Team:</th>
        <td>
          <xsl:value-of select="svc:Configuration/svc:TeamColor"/>
        </td>
      </tr>
    </table>
    <h6 align="center">(c)2011 by HCCRobotica.nl</h6>
  </xsl:template>

</xsl:stylesheet>
